import {createApp} from 'vue'

import App from './App.vue'
import router from './router/index'
import 'animate.css';


/**  引入图标库   **/
import Unicon from 'vue-unicons'
// import {
//     uniLayerGroupMonochrome,
//     uniCarWash,
//     uniYoutubeThinline
// } from 'vue-unicons/dist/icons'
//
// Unicon.add([uniLayerGroupMonochrome,
//     uniCarWash,
//     uniYoutubeThinline])
import * as Icons from 'vue-unicons/dist/icons.js'

let icons = []
Object.entries(Icons).map((value, index) => {
    // console.log(value[1])
    icons.push(value[1])
})
Unicon.add(icons)
/**
 * name	        Icon name	        string	-	-
 * width	    Width of icon	    string	-	-
 * height	    Height of icon	    string	-	-
 * fill	        Fill color of icon	string	HEX or color name	-
 * hover-fill	Fill color on hover	string	HEX or color name	-
 * icon-style	Icon style	        string	line/monochrome/solid/thinline	line
 *线/单色/实体/细线
 * **/


/**  引入组件   **/
import elementUi from 'element-plus'
// import 'element-plus/theme-chalk/index.css'
// import 'element-plus/theme-chalk/dark/css-vars.css'
// import './styles/dark/css-vars.css'

import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'


import {createPinia} from 'pinia'

const pinia = createPinia()

/**  挂载全局事件总线   **/
import mitt from 'mitt';

window.$eventBus = mitt();

import Qs from 'qs'

window.qs = Qs


/**  引入移动端组件   **/
// 按需导入
// import { Button } from 'vant';
// app.use(Button)
// 全部导入
// import vAnt from 'vant'
// import 'vant/lib/index.css';


// 后台APP
const app = createApp(App);
app.use(router)
app.use(Unicon)
app.use(elementUi, {
    locale: zhCn,
})
app.use(pinia)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
// app.config.globalProperties.$eventBus = mitt()
app.mount('#app')








